//
//  AppealTypeListModel.m
//  Utils
//
//  Created by enghou on 2018/6/23.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "AppealTypeListModel.h"
@implementation AppealTypeListModel
-(instancetype)initWithSource:(NSDictionary *)source{
    self = [super initWithSource:source];
    if (self) {
        self.tid = source[@"domainId"];
        self.name = source[@"domainName"];
//        self.children
        NSArray *rows = source[@"rows"];
        NSMutableArray *elements = [NSMutableArray array];
        for (NSDictionary *element in rows) {
            AppealSubTypeItemModel *m = [[AppealSubTypeItemModel alloc]initWithSource:element];
            [elements addObject:m];
        }
        self.children = elements;
    }
    return self;
}

+ (NSDictionary<NSString *,id> *)modelCustomPropertyMapper{
    return @{@"ID":@"id"};
}

@end
